package com.controller;

import com.dao.Person1Dao;
import com.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentHandler {
    @Autowired
    private Person1Dao studentDao;

    @GetMapping("/add")
    public List<Student> getaddStudent(){
        return studentDao.findAll();
    }
}
